/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.fee.facade.command.order.rule;

import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import info.peigen.hotpot.common.core.result.ResultCode;
import info.peigen.hotpot.common.service.base.ServiceOrderBase;
import info.peigen.hotpot.common.service.base.exception.BusinessException;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

/**
 * <b>(FeeRuleDeleteOrder)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2022/6/1
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class FeeRuleDeleteOrder extends ServiceOrderBase {
    /** 删除哪个规则Id */
    String ruleId;
    /** 删除哪个客户相关规则 */
    String customerId;

    @Override
    public void check() {
        super.check();
        Assert.isFalse(StrUtil.isAllEmpty(customerId, ruleId), () -> new BusinessException(ResultCode.FAILURE, "不得都为空!"));
    }
}
